project(echo)

cmake_minimum_required(VERSION 2.8)

set(CMAKE_CXX_STANDARD 11)
add_definitions(-g)

option(SERVER "build server" ON)

aux_source_directory(. ALL_SRCS)

if (SERVER)
    add_definitions(-DSERVER)
    add_executable(echo_server ${ALL_SRCS})
else()
    add_executable(echo_client ${ALL_SRCS})
endif()